package cn.supermarket.common.core.param;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author yp
 * @Date 2025/2/20:08:31
 */
@Data
public class BaseDTO {
    @ApiModelProperty(value = "用户编号")
    private Long userId;
    @ApiModelProperty(value = "页码")
    private int pageNum;
    @ApiModelProperty(value = "每页的数据量")
    private int pageSize;
    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }
}
